package ${packageName};
<#if needDagger>
import android.content.Context;
</#if>
import ${superClassFqcn};
import android.os.Bundle;

import ${applicationPackage}.R;
import ${applicationPackage}.common.base.BaseActivity;
<#if needDagger>
import ${packageName}.dagger.Dagger${pageName}Component;
import ${packageName}.dagger.${pageName}Module;

import static ${applicationPackage}.common.base.BaseApplication.getAppComponent;
</#if>
public class ${activityClass} extends BaseActivity<${pageName}Presenter> implements ${pageName}Contract.View{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
<#if generateLayout>
        setContentView(R.layout.${layoutName});
</#if>
<#include "../../../../common/jni_code_usage.java.ftl">
    }
<#include "../../../../common/jni_code_snippet.java.ftl">

<#if needDagger>
 	@Override
    protected void attachBaseContext(Context newBase) {
        super.attachBaseContext(newBase);
        Dagger${pageName}Component.builder()
                .appComponent(getAppComponent())
                .${pageName[0]?lower_case}${pageName?substring(1,pageName?length)}Module(new ${pageName}Module(this))
                .build().inject(this);
    }
</#if>
}
